import tensorflow as tf
import matplotlib.pyplot as plt

(train_image,train_label),(test_image,test_label) = tf.keras.datasets.cifar10.load_data()
train_image = train_image/255.0
test_image = test_image/255.0
label_name=['airplane','car','bird','cat','deer','dog','frog','horse','ship','truck']
plt.figure(figsize=(8,4)) #设置画布的大小
for i in range(21):
    plt.subplot(3,7,i+1)
    plt.axis('off')
    plt.title(label_name[test_label[i][0]])
    plt.imshow(test_image[i], cmap='viridis')
model = tf.keras.models.load_model("po1/znxl002.h5")
model.evaluate(test_image, test_label)
